package org.jeecg.modules.xindian.reconciliation.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.xindian.reconciliation.dto.rsp.DataSumStatisticsRow;
import org.jeecg.modules.xindian.reconciliation.dto.rsp.DataSumStatisticsRsp;
import org.jeecg.modules.xindian.reconciliation.dto.rsp.PlatformCodeSumStatisticsRow;
import org.jeecg.modules.xindian.reconciliation.dto.rsp.ProjectSumStatisticsRow;
import org.jeecg.modules.xindian.reconciliation.controller.req.TrendReqInfo;
import org.jeecg.modules.xindian.reconciliation.controller.rsp.CommonDataStatic;
import org.jeecg.modules.xindian.reconciliation.controller.rsp.RankAndProportionRsp;
import org.jeecg.modules.xindian.reconciliation.controller.rsp.SalemanAndChannelProportionRsp;
import org.jeecg.modules.xindian.reconciliation.controller.rsp.TrendRspInfo;
import org.jeecg.modules.xindian.reconciliation.dto.MatchBaoDanHao;
import org.jeecg.modules.xindian.reconciliation.dto.MatchProjectName;
import org.jeecg.modules.xindian.reconciliation.dto.StatisticsQuery;
import org.jeecg.modules.xindian.reconciliation.entity.InsuranceStatistics;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Date;
import java.util.List;

/**
 * @Description: insurance_statistics
 * @Author: jeecg-boot
 * @Date:   2023-07-22
 * @Version: V1.0
 */
public interface IInsuranceStatisticsService extends IService<InsuranceStatistics> {


    /**
     * 保函匹配
     * @return
     */
    List<MatchBaoDanHao> matchBaoHan( List<MatchBaoDanHao> baoDanHaos);

    /**
     * 项目匹配
     * @return
     */
    List<MatchProjectName> matchProject( List<MatchProjectName> matchProjectNames);

    /**
     * 保单总数统计
     * @param dataStatistics
     * @return
     */
   DataSumStatisticsRsp dataSumStatistics( StatisticsQuery dataStatistics);

    /**
     *
     * @param page
     * @param dataStatistics
     * @return
     */
   IPage<ProjectSumStatisticsRow> queryProjectSumStatisticsRow(Page page,  StatisticsQuery dataStatistics);

    /**
     *
     * @param dataStatistics
     * @return
     */
   List<ProjectSumStatisticsRow> queryProjectSumStatisticsRowAll( StatisticsQuery dataStatistics);

    /**
     *
     * @param page
     * @param dataStatistics
     * @return
     */
   IPage<DataSumStatisticsRow> queryDataSumStatisticsRow(Page page,  StatisticsQuery dataStatistics);

    /**
     *
     * @param dataStatistics
     * @return
     */
   List<DataSumStatisticsRow> queryDataSumStatisticsRowAll( StatisticsQuery dataStatistics);

    /**
     *
     * @param page
     * @param dataStatistics
     * @return
     */
   IPage<PlatformCodeSumStatisticsRow> queryInsuranceSumStatisticsRow(Page page, StatisticsQuery dataStatistics);

    /**
     *
     * @param dataStatistics
     * @return
     */
   List<PlatformCodeSumStatisticsRow> queryInsuranceSumStatisticsRowAll(StatisticsQuery dataStatistics);

    /**
     *
     * @param insurance
     * @param area
     * @return
     */
   List<InsuranceStatistics> loadByInsuranceAndPlatform(String insurance,List<String> Platfor,Boolean conditionByPayTime,Date lastMounth);

   List<InsuranceStatistics> loadByPolicyHolderName(List<String> policyHolderNames,Date date);
   List<InsuranceStatistics> loadByPolicyNo(List<String>    policyNos);
   List<InsuranceStatistics> loadByInsuranceAreaAndPlatform(String insurance,List<String> platform,String channelName,Date lastMounth);


    TrendRspInfo trend(TrendReqInfo trendReqInfo);

    RankAndProportionRsp rankAndProportion(TrendReqInfo trendReqInfo);
    SalemanAndChannelProportionRsp salesmanAndChannel(TrendReqInfo trendReqInfo);
    List<CommonDataStatic> premiumRank(TrendReqInfo trendReqInfo);


    void loadData();


    void processOneDaySalemanInfo();




}
